package org.test.client.ui.component.field;
/**
 * txtfield 的 前端与后端
 * @author Guodeqi
 *
 */
public class TxtFieldSE {
	//图标放在开头 
	public boolean start = true;
	//图标有背景颜色与边框
	public boolean haveBorder = true;
	//是fontaware 的图标 还是字符串
	public boolean fontAwareIcon = true;
	//图标信息或字符串
	public String info = null;
	
	public TxtFieldSE(String info){
		this.info = info;
	}
	
	public static TxtFieldSE createStartIcon(String iconStr){
		TxtFieldSE txtFieldSE = new TxtFieldSE(iconStr);
		return txtFieldSE;
	}
	
	public static TxtFieldSE createEndIcon(String iconStr){
		TxtFieldSE txtFieldSE = new TxtFieldSE(iconStr);
		txtFieldSE.start = false;
		return txtFieldSE;
	}
	
	public static TxtFieldSE createStartInfo(String info){
		TxtFieldSE txtFieldSE = new TxtFieldSE(info);
		txtFieldSE.fontAwareIcon = false;
		return txtFieldSE;
	}
	
	public static TxtFieldSE createEndInfo(String info){
		TxtFieldSE txtFieldSE = new TxtFieldSE(info);
		txtFieldSE.fontAwareIcon = false;
		txtFieldSE.start = false;
		return txtFieldSE;
	}
	
	public static TxtFieldSE createEndIconWithinBorder(String info){
		TxtFieldSE txtFieldSE = new TxtFieldSE(info);
		txtFieldSE.start = false;
		txtFieldSE.haveBorder = false;
		return txtFieldSE;
	}
}
